package com.ics.atable.chat.service;

import com.baomidou.mybatisplus.extension.service.IService;
import com.ics.atable.chat.model.entity.EmbeddingsPersist;

import java.util.List;
import java.util.Map;

/**
 * Embedding service
 *
 * @author haohongbin
 */
public interface EmbeddingsPersistService extends IService<EmbeddingsPersist> {

    float[] getEmbeddingVectorByContent(String content, String type);

    boolean saveOrUpdateEmbeddingVector(EmbeddingsPersist embeddingsPersist);

    Map<String, float[]> getEmbeddingVectorsByContents(List<String> contents, String type);

    void saveOrUpdateBatchEmbeddingVectors(List<EmbeddingsPersist> embeddingsPersists);
}
